const process = {
  state: {
    approverDrawer: false,
    approverDrawerData: {},
    flyNoticeDrawerData: {},
    flyNoticeDrawer: false,
    copyerDrawer: false,
    copyerDrawerData: {},
    conditionDrawerData: {},
    conditionTree: {},
    conditionDrawer: false,
    clipboardNode: {},
    nodePasting: false,
    groupList: []
  },
  mutations: {
    SET_APPROVE_SWITCH: (state, activeTabs) => {
      state.approverDrawer = activeTabs;
    },
    SET_APPROVE_DATA: (state, data) => {
      state.approverDrawerData = data;
    },
    SET_FLYNOTICE_DATA: (state, data) => {
      state.flyNoticeDrawerData = data;
    },
    SET_FLYNOTICE_SWITCH: (state, activeTabs) => {
      state.flyNoticeDrawer = activeTabs;
    },
    SET_COPYER_SWITCH: (state, activeTabs) => {
      state.copyerDrawer = activeTabs;
    },
    SET_COPYER_DATA: (state, data) => {
      state.copyerDrawerData = data;
    },
    SET_CONDITION_DATA: (state, data) => {
      state.conditionDrawerData = data;
    },
    SET_CONDITION_SWITCH: (state, activeTabs) => {
      state.conditionDrawer = activeTabs;
    },
    SET_CONDITION_TREE: (state, data) => {
      state.conditionTree = data;
    },
    SET_CLIPBOARD_NODE: (state, data) => {
      state.clipboardNode = data;
    },
    SET_NODE_PASTING: (state, status) => {
      state.nodePasting = status;
    },
    SET_GROUP_LIST: (state, data) => {
      state.groupList = data;
    }
  },
  actions: {
    storeClipboardNode({ commit }, node) {
      commit('SET_CLIPBOARD_NODE', node);
    },
    changeNodePasteStatus({ commit }, status) {
      commit('SET_NODE_PASTING', status);
    }
  }
};

export default process;
